<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<?php
$this->load->view('admin/public_header');
?>
<div id="middle">
    <?php
    $this->load->view('admin/public_menu');
    ?>
    <div class="right"  id="mainFrame">
        <div class="right_cont">
            <ul class="breadcrumb">
                <?php echo $breadcrumb;?>
            </ul>

            <div class="title_right">
                <strong>管理组信息</strong>
            </div>
            <form action="<?php echo site_url('admin/admins/group/add');?>" method="post" id="pageForm" target="postIframe">
                <table class="table table-bordered" id="base_info">
                    <tr>
                        <td width="80" align="right" bgcolor="#f1f1f1">分组名称: </td>
                        <td width="750" colspan="3">
                            <input type="text" name="group_name" id="group_name" value="" />[*]
                        </td>
                    </tr>
                    <tr>
                        <td align="right">配置权限:</td>
                        <td align="left">
                        <?php
						$group_perm = $this->load->get_var('group_perm');
						?>
                        <ul id="selectFunc">
                            <li><label onclick="$('#selectFunc input').attr('checked',true);">选择全部</label></li>
                            <li><label onclick="$('#selectFunc input').attr('checked',false);">全部取消</label></li>
                        <?php foreach($mmfunc as $func_name => $funcs):?>
                            <li>
                            <label onclick="$('#funcs_<?php echo $func_name;?> input').attr('checked',true);"><?php echo $funcs['text'];?></label>
                            <ul id="funcs_<?php echo $func_name;?>">
                                <?php foreach($funcs['menu'] as $func):?>
                                    <input type="checkbox" name="group_perm[]" value="<?php echo $func['perm'];?>" /> <?php echo $func['text'];?>
                                <?php endforeach;?>
                            </ul>
                            </li>
                        <?php endforeach;?>
                        </ul>
                        </td>
                    </tr>
                </table>
                <table  class="margin-bottom-20  table no-border" >
                    <tr>
                        <td>
                        <input type="button" value="添加" class="btn btn-info" style="width:80px;" onclick="$('#pageForm').submit();" />
                        <input type="button" value="返回" class="btn btn-info" onclick="window.history.go(-1)" style="width:80px;" />
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>

</div>
<iframe src="" height="0" width="0" style="display:none;" id="postIframe" name="postIframe"></iframe>
<?php
$this->load->view('admin/public_footer');
?>
